<?php
/*
Template Name: Filter Author
*/
?>
<?php 
	$user_id = $_GET['user_id'];
	$query = new WP_Query( 'author='. $user_id);
?>
	
<?php while ( $query->have_posts() ) : $query->the_post() ?>
	<li id="post-<?php the_ID();?>">
		<span class="list-img">
				<img alt="" src="<?php bloginfo('template_url');?>/css/images/img-thumbnail.png">
			</span>
		<div class="title"><h2><?php the_title(); ?></h2></div>
		<span class="user-name"><em>by</em><?php the_author(); ?></span>
		<?php if (get_comments_number()!=0): ?>
			<div class="comment-number"><?php comments_number('0','1','%'); ?></div>
		<?php endif?>
		<span class="post-date"><?php echo $post->post_date ?></span> 
	</li>
<?php endwhile; ?>
<?php wp_reset_postdata();?>
